<script setup lang="ts">
import { ref } from 'vue';
import DynamicForm from '../../../components/dynamic-form.vue';
import ItemTypeFormItem from './item-type-form-item.vue';
defineProps<{
  sourceProductList: IbFpProductApi.Dto[];
}>();

const dynamicFormRef = ref();
/**
 * 暴露list字段给父组件
 */
defineExpose({ dynamicFormRef });
</script>
<template>
  <dynamic-form button-title="添加物品" title="物品品类" ref="dynamicFormRef">
    <template #default="{ item }">
      <item-type-form-item :item="item" :product-list="sourceProductList" />
    </template>
  </dynamic-form>
</template>
